package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/3/14 11:23
 * @description
 */
public class Code434 {
    public int countSegments(String s) {
        String[] s1 = s.split(" ");
        int count = 0;
        for (String s2 : s1) {
            if (!s2.equals("")) {
                count++;
            }
        }
        return count;
    }
}
